#ifndef _VOLUMEUNIT_H_
#define _VOLUMEUNIT_H_

#include "Unit.h"
#include <string>


#define GET_UNIT(unit) \
    get##unit()

#define CONST_VOLUME_UNIT_REFERECE \
    const VolumeUnit&
#define DECL_GET_VOLUME_UNIT(unit) \
    static CONST_VOLUME_UNIT_REFERECE GET_UNIT(unit)
class VolumeUnit : public Unit
{
public:    
    const VolumeUnit& getBaseUnit() const;

public:
    DECL_GET_VOLUME_UNIT(Tsp);   
    DECL_GET_VOLUME_UNIT(Tbsp);   
    DECL_GET_VOLUME_UNIT(Oz);  
    
private:
    VolumeUnit(int ratePerBaseUnit, std::string name);
};

#define VOLUME_UNIT_SCOPE \
    VolumeUnit::
#define SINGLETON_VOLUME_UNIT(unit) \
    VOLUME_UNIT_SCOPE GET_UNIT(unit)

//The Singleton Units in the system
#define TSP SINGLETON_VOLUME_UNIT(Tsp)
#define TBSP SINGLETON_VOLUME_UNIT(Tbsp)
#define OZ SINGLETON_VOLUME_UNIT(Oz)

#endif


